#pragma once
#include "afxcmn.h"
#include <string>
#include <vector>

#define FLM_PATH_CHANGED (WM_USER + 'F' + 'C')

class CFileList :
	public CListCtrl
{
	struct ItemInfo
	{
		ItemInfo(){}
		ItemInfo(std::string str, bool b)
			: strPath(str), bDir(b){}
		std::string strPath;
		bool bDir;
	};

public:
	CFileList(void);
	~CFileList(void);

	bool ShowPath(const CString& strPath);
	bool Init();
	CString GetPathName();

	int GetIconIndex(LPCTSTR lpszPath, bool bIsDir, bool bSelected, CString& strType);
	DECLARE_MESSAGE_MAP()
	afx_msg void OnNMDblclk(NMHDR *pNMHDR, LRESULT *pResult);

	CString m_strParant;
	CString m_strCurPath;

	std::vector<ItemInfo> m_arPath;
 };
